import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
//公共头
import Navbar from './components/Navbar'
Vue.component("Navbar", Navbar)
//公共方法
import { $gotoUrl, getDateDiff } from './utils/utils'
Vue.prototype.$gotoUrl = $gotoUrl
Vue.prototype.$getDateDiff = getDateDiff
//接口请求
import request from './request/request.js'
Vue.prototype.$http = request;
//聊天
import TIM from 'tim-js-sdk'
import tim from './commen/tim/tim.js'
Vue.prototype.tim = tim.tim
Vue.prototype.$TIM = TIM
//vuex
import store from './store/index.js'
Vue.prototype.$store = store

Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp () {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif